//
//  XMPPChatManager.h
//  LTChat
//
//  Created by apple on 4/9/14.
//  Copyright (c) 2014 fantasy. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "XMPPConfig.h"
#import "XMPPFramework.h"

#define AuthorizedFinishNotification @"AuthorizedFinishNotification"
#define NewFriendsRequstNotification @"NewFriendsRequstNotification"

@interface XMPPChatManager : NSObject

@property (nonatomic,readonly)XMPPStream *xmppStream;
@property (nonatomic,readonly)XMPPRoster *xmppRoster;

//初始化需要设置得参数
+(id)shareXMPPManagerInstance:(XMPPConfig *)config;
+(id)shareXMPPManagerInstance;
-(void)setConfig:(XMPPConfig *)config;
//用户登录
-(void)loginWithUsername:(NSString *)username password:(NSString *)password;

//匿名登录
-(void)loginWithAnonymous;

//用户注册
-(void)registerWithUsername:(NSString *)username password:(NSString *)password;

//上线
-(void)goOnline;

//下线
-(void)goOffline;

//链接
-(BOOL)connect;

//断开链接
-(void)disConnect;

//添加好友
-(void)addFriendSubscribe:(NSString *)username;

@end
